﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ScriptCoreLib;

namespace AvalonTycoonMansion.Shared.Isometric
{
	[Script]
	public static class IsometricContainerExtensions
	{
		public static IEnumerable<IsometricContainerTile> Select(this IEnumerable<IsometricContainerTile> source, int x, int y, int cx, int cy)
		{
			return from k in source
				   where k.X >= x
				   where k.Y >= y
				   where k.Y < y + cy
				   where k.X < x + cx
				   select k;
		}
	}
}
